using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter18
{
	/// <summary>
	/// Example08: The Mistuned Piano Strings
	/// Two identical piano strings of length 0.75 m are
	/// each tuned exactly to 440 Hz. The tension in one of
	/// the string is then increased by 1.0%. If they are
	/// now struck, what is the beat frequency between the
	/// fundamentals of the two strings?
	/// f_{beat} = 2 Hz.
	/// </summary>
	public class Example08
	{
		public Example08()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			double f1 = 440.0;
			// v = 2*L*f = sqrt(T/mu)
			// 2*L*f' = sqrt(1.01*T/mu);
			// f' = sqrt(1.01)*f
			double fb = Math.Abs(f1 - f1*Math.Sqrt(1.01));
			result+=Convert.ToString(fb)+"\r\n";				
		}
	}
}
